const http = require("http");

let data = require("./data");
http.createServer((req,res)=>{
    res.setHeader("Access-Control-Allow-Origin", "*")//跨域
    res.setHeader('Content-Type', 'text/html; charset=utf-8');//设置乱码
    res.end(JSON.stringify(data))
}).listen(3000)

console.log(3000);